<?php
include "init.php";

$row = $db->getRow("SELECT id, resume FROM $_SC[tablepre]notice WHERE state=1 ORDER BY update_time DESC LIMIT 1");
$content = $row['resume'];
$content = str_replace('"', "'", $content);
$content = str_replace("\r\n", '', $content);

$c1 = $db->getOne("SELECT COUNT(sid) FROM $_SC[tablepre]student WHERE fid='$_SESSION[fid]' AND is_delete=0 LIMIT 1");
$c2 = $db->getOne("SELECT COUNT(sid) FROM $_SC[tablepre]student WHERE fid='$_SESSION[fid]' AND status=1 AND is_delete=0 LIMIT 1");
$c3 = $db->getOne("SELECT COUNT(sid) FROM $_SC[tablepre]student WHERE fid='$_SESSION[fid]' AND status=2 AND is_delete=0 LIMIT 1");
$c4 = $db->getOne("SELECT COUNT(sid) FROM $_SC[tablepre]student WHERE fid='$_SESSION[fid]' AND status=3 AND is_delete=0 LIMIT 1");
$c5 = $db->getOne("SELECT COUNT(sid) FROM $_SC[tablepre]student WHERE fid='$_SESSION[fid]' AND status=4 AND is_delete=0 LIMIT 1");
$c6 = $db->getOne("SELECT COUNT(sid) FROM $_SC[tablepre]student WHERE fid='$_SESSION[fid]' AND status=5 AND is_delete=0 LIMIT 1");

$fran = $db->getRow("SELECT lastloginip, lastlogintime FROM $_SC[tablepre]franchisee WHERE fid='$_SESSION[fid]' LIMIT 1");

include template('guide');
?>